<include file="public:header" />
	<div class="toptip link_lan">
		<h2>提示：</h2>
		<p>
	电子地图API的服务是由<a href="http://developer.baidu.com/" target="_blank"><strong>百度</strong></a>提供，任何非盈利性网站均可使用。请参阅<a href="http://developer.baidu.com/" target="_blank"><strong>使用条款</strong></a>获得详细信息。<br />
	        如用于商业用途，需要同百度地图另行达成协议或获得百度地图的书面许可
	        使用电子地图，百度地图相应的ak。 现在就去<a href="http://developer.baidu.com/" target="_blank">申请</a>
		</p>
	</div>
	<div class="toptit">电子地图设置</div>
	<form action="{:U('config/edit')}" method="post"  name="form1" id="form1">
		<table width="100%" border="0" cellspacing="5" cellpadding="0">
			<tr>
			<td valign="top">
				<table width="100%" border="0" cellpadding="1" cellspacing="5"  class="link_lan" style=" margin-bottom:3px;">
					<!-- -->
					<tr>
						<td width="120" align="right">百度地图AK:</td>
						<td width="200" height="25"><input name="map_ak" type="text" value="{:C('qscms_map_ak')}"  id="map_ak"  class="input_text_200"  style="color:#009900; font-weight:bold"/></td>
					</tr>
					<tr>
						<td width="120" align="right">默认中心点X坐标：</td>
						<td width="200" height="25"><input name="map_center_x" type="text" value="{:C('qscms_map_center_x')}"  id="map_center_x"  class="input_text_200"  style="color:#009900; font-weight:bold"/></td>
						<td>推动电子地图，系统将自动获取坐标</td>
					</tr>
					<tr>
						<td align="right">默认中心点Y坐标：</td>
						<td height="25"><input name="map_center_y" type="text" value="{:C('qscms_map_center_y')}"  id="map_center_y"  class="input_text_200" style="color:#009900; font-weight:bold"/></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td align="right">默认缩放级别：</td>
						<td height="25"><input name="map_zoom" type="text" value="{:C('qscms_map_zoom')}" id="map_zoom"   class="input_text_200" style="color: #009900; font-weight:bold"/></td>
						<td>&nbsp;</td>
					</tr>
					<tr>
						<td align="right">&nbsp;</td>
						<td height="25">
							<input type="hidden" name="type" value="map">
							<input type="submit" class="admin_submit" value="保存修改"/></td>
						<td>&nbsp;</td>
					</tr>
				</table>
			</td>
			</tr>
			<tr>
				<td valign="top">
					<div style="width:600px;height:400px; border:1px #CCCCCC solid" id="container"></div>
				</td>
			</tr>
		</table>
	</form>
</div>
<include file="public:footer" />
<script src="http://api.map.baidu.com/api?v=1.2" type="text/javascript"></script>
<script type="text/javascript">
	var map = new BMap.Map("container");       // 创建地图实例   
	var point = new BMap.Point({:C('qscms_map_center_x')},{:C('qscms_map_center_y')});  // 创建点坐标   
	map.centerAndZoom(point, {:C('qscms_map_zoom')}); 
	map.addControl(new BMap.NavigationControl());   
	map.addEventListener("moveend", function(){   
	var center = map.getCenter();
	document.getElementById("map_center_x").value=center.lng; 
	document.getElementById("map_center_y").value= center.lat; 
	document.getElementById("map_zoom").value=map.getZoom();
});   
</script>
</body>
</html>